package org.example.GirdFind;

/**
 * @ClassName 地图坐标格子
 * @Description TODO
 * @Author hongjun
 * @Date 2024/5/26 下午6:22
 * @Version 1.0
 */
public class Gird {
    private int x;
    private int y;
    //格子内有多少阻挡的小格子
    private int block;
    private int type;
    /**
     * 是否完全阻挡
     */
    private boolean stopBlock = false;

    public Gird() {}

    public Gird(int x, int y) {
        this.x = x;
        this.y = y;
    }

    public Gird(int x, int y, int type) {
        this.x = x;
        this.y = y;
        this.type = type;
    }

    public int getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }

    public int getBlock() {
        return block;
    }

    public void setBlock(int block) {
        this.block = block;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public boolean isStopBlock() {
        return stopBlock;
    }

    public void setStopBlock(boolean stopBlock) {
        this.stopBlock = stopBlock;
    }

    @Override
    public String toString() {
        return "Gird{" +
                "y=" + y +
                ", x=" + x +
                ", block=" + block +
                ", type=" + type +
                '}';
    }
}
